package fibonachi;

import org.junit.Test;

public class fiboslow {
	private static int getal1 = 1;
	private static int getal2 = 1;
	private static int getal3 = 0;
	
	public static int fibo(int a) {
		if(a > 0)
		{
			getal3 = getal1 + getal2;
			getal1 = getal2;
			getal2 = getal3;
			return fibo(a-1);
		}
		return getal3;
	}


//langzaam
	public static int slow(int n) {
		if (n == 0 || n == 1) { 
			return 1;
		} else {
			return slow(n-1) + slow(n-2);
		}
	}
}